﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using KenLib.BusinessManager;

public partial class JOINT_frmJ_MCompManager : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ((JOINT_MstPage_JOINT)this.Master).changeTitle("送出し機関情報管理");
        ((JOINT_MstPage_JOINT)this.Master).HideLiArea("frmJ_MCompManager");
        if (!IsPostBack)
        {
            //Contructer session
            Session.Remove("obj_joint_59");
            Session.Remove("frmJ_JointCompBasicInfoRef_Mode");
            Session.Remove("企業コード_JS_59");
            if (Session["役"]==null || Session["役"].ToString()=="")
            {
                Response.Redirect("~/frmD_Login.aspx");
            }
            if (Session["役"] != null && Session["役"].ToString() == "1")
            {
                btn送出し機関情報参照.Enabled = false;
                btn_職員情報参照修正.Enabled = false;
            }
            if (Session["役"] != null && (Session["役"].ToString() == "2" || Session["役"].ToString() == "3"))
            {
                btn_送出し機関情報登録.Enabled = false;
            }
        }
        
    }
    protected void btn送出し機関情報参照_Click(object sender, ImageClickEventArgs e)
    {
        if (Session["役"] != null && Session["役"].ToString() != "1")
        {
            //Use check submit button 送出し機関情報参照
            Session["frmJ_MCompManager_Flag"] = "1";
            Session.Remove("frmJ_IntroCompManager_Flag");
            Response.Redirect("../JOINT/frmJ_JointCompBasicInfoRef.aspx");
        }
        
    }
    protected void btmn_職員情報登録_Click(object sender, ImageClickEventArgs e)
    {
        Session["IDStaffBasicInfoInput"] = null;
        Session["ModeUpdateStaffBasicInfoInput"] = null;
        Response.Redirect("../JOINT/frmJ_StaffBasicInfoInput.aspx");
    }
    protected void btn_職員情報参照修正_Click(object sender, ImageClickEventArgs e)
    {
        if (Session["役"] != null && Session["役"].ToString() != "1")
        {
            Response.Redirect("../JOINT/frmJ_EmpBasicInfo.aspx");
        }
        
    }
    protected void btn職員情報一括登録修正_Click(object sender, ImageClickEventArgs e)
    {
        //Response.Redirect("../JOINT/frmJ_EmpBasicInfo.aspx");
    }
    protected void btn_送出し機関情報登録_Click(object sender, ImageClickEventArgs e)
    {
        //Clear mot so session da su dung trong trang frmJ_CompBasicInput.aspx
        Session.Remove("obj_joint_59");
        Session.Remove("frmJ_JointCompBasicInfoRef_Active_JS_60");
        Response.Redirect("../JOINT/frmJ_CompBasicInput.aspx");
    }
}
